import request from '@/config/axios'

// 会员卡消息 VO
export interface CardMsgVO {
  id: number // ID
}

// 会员卡消息 API
export const CardMsgApi = {
  // 查询会员卡消息分页
  getCardMsgPage: async (params: any) => {
    return await request.get({ url: `/wo/card-msg/page`, params })
  },

  // 查询会员卡消息详情
  getCardMsg: async (id: number) => {
    return await request.get({ url: `/wo/card-msg/get?id=` + id })
  },

  // 新增会员卡消息
  createCardMsg: async (data: CardMsgVO) => {
    return await request.post({ url: `/wo/card-msg/create`, data })
  },

  // 修改会员卡消息
  updateCardMsg: async (data: CardMsgVO) => {
    return await request.put({ url: `/wo/card-msg/update`, data })
  },

  // 删除会员卡消息
  deleteCardMsg: async (id: number) => {
    return await request.delete({ url: `/wo/card-msg/delete?id=` + id })
  },

  // 导出会员卡消息 Excel
  exportCardMsg: async (params) => {
    return await request.download({ url: `/wo/card-msg/export-excel`, params })
  }
}